//
//  EventViewTableViewCell.m
//  Mecca
//
//  Created by Nico Villanueva iOS Dev on 24/7/14.
//  Copyright (c) 2014 TapDash Heuristics. All rights reserved.
//

#import "EventViewTableViewCell.h"

@implementation EventViewTableViewCell

- (void)awakeFromNib
{
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated
{
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

-(void)setImageString:(NSString *)strImage{
    
    NSString *strImg = [NSString stringWithFormat:@"http://192.185.93.102/~boomeran/backend-panel/%@",strImage];
    
    [NSThread detachNewThreadSelector:@selector(showImage:) toTarget:self withObject:strImg];
    
}

-(void)showImage:(NSString*)imageShow{
    @autoreleasepool {
        NSData *imageList = [NSData dataWithContentsOfURL:[NSURL URLWithString:imageShow]];
        [self.imgEventBG setAlpha:0];
        [UIView animateWithDuration:1 animations:^{
            
            UIImage *image = [UIImage imageWithData:imageList];
            
            //            if (!image) {
            self.imgEventBG.image = image;
            [self.actLoading setHidden:YES];
            [self.imgEventBG setAlpha:1];
            
            //            }
            
        } completion:^(BOOL finished) {
            
        }];
        
        
        //[self animationActivity];
    }
}


@end
